export default {
    //添加搜索历史查询记录
    addSearchHistory(state,payload){
        //list 中包含该记录的时候删除
        const index = state.serchHistoryList.insexOf(payload);
        if(index>-1){
            state.searchHistory.splice(index,1);
        }
        state.searchHistoryList.unshift(payload);
        //历史记录中最大记录10个
        const count = state.searchHistoryList.length;
        state.searchHistoryList.splice(20,count)
    }
}